* Gain codes 4, 5, 8, 9, 12, and 13 are undefined when making thermocouple measurements.
** If you are specifying a gain code from non-linear input groups 0, 1, or 2 and you are measuring with a thermocouple, you must add an additional channel to the input scan list. This additional channel must specify cold junction compensation (code 17) as the gain element and it should be placed last in the input scan list.
Thermocouple type is defined by the value of the unsigned chan variable of the last scan list element containing gain code 17:
unsigned chan value
TC type
Multiplier for gain of 100
Multiplier for gain of 1000
0
K
1232.3333
121.9772
1
J
760
94.94897
2
T
400
115.2563
3
R
1768
548.1296
*** The A/D converter delivers “counts” as an end result instead of degrees. These counts can be scaled to °C using the following formula:
where x = ADC counts as delivered by the hardware, and multiplier is from the table above. Make sure you use the appropriate multiplier for the selected gain.